//
//  NetHomePage.m
//  carcareIOS
//
//  Created by ileo on 16/3/17.
//  Copyright © 2016年 chezheng. All rights reserved.
//

#import "NetHomePage.h"
#import "AIUserInfo.h"
#import "NetEngineServer.h"

@implementation NetHomePage

+(NetHomePage *)getLevelInfo{
    return [__SELF request:@"/driverLevel/getLevelInfoForApp" withParams:@{} type:REQUEST_POST];
}
+(NetHomePage *)bindingPolicyPicWithImageURL:(NSString *)url{
    return [__SELF request:@"/papers/updatePapers" withParams:@{@"policy" : url} type:REQUEST_POST];
}
+(NetHomePage *)getPolicyStatus
{
    return [__SELF request:@"/fineUser/getPolicyStatus" withParams:nil type:REQUEST_POST];
}

-(NSDictionary *)requestCommonParams{
    if (![USERINFO.session isNotNil]) {
        return nil;
    }
    return @{@"userid":@(USERINFO.userID),@"session":USERINFO.session};
}

@end

@implementation PolicyStatusModel
- (void)setPolicyStatus:(NSInteger)policyStatus
{
    _policyStatus = policyStatus;
    switch (policyStatus) {
        case 1:
        case 4:
            self.policyStatusBool = NO;
            break;
        case 2:
        case 3:
            self.policyStatusBool = YES;
            break;
        default:
            break;
    }
}
- (void)setTotalScore:(NSInteger)totalScore
{
    _totalScore = totalScore;
    self.totalScoreMoney = totalScore / 100.00;
}
- (void)setCurrScore:(NSInteger)currScore
{
    _currScore = currScore;
    self.currScoreModey = currScore / 100.00;
}
@end
